Skip to content

ci(release): open the changelog PR as the release App - #608

Merged
kylecarbs merged 1 commit into
mainfrom
ci/release-pr-app-token
Nov 20, 2026
Merged

kylecarbs merged 1 commit into
mainfrom
ci/release-pr-app-token

Conversation

@kylecarbs

Copy link
Copy Markdown
Member

The org no longer lets GITHUB_TOKEN open pull requests, so the release's changelog PR fails at the end of the run with GitHub Actions is not permitted to create or approve pull requests.

The build job now uploads the changed file(s) as an artifact and drops its PR permissions. A new last job, changelog, runs in the main-only release-pr environment. It downloads the files, checks whether anything changed, and only then mints a token from coder-jetbrains-coder-release through Cloud KMS, scoped to this repo with contents and pull-request write. It pushes the branch and opens the PR with that token. Only this job requests id-token, so the Gradle build can't sign as the App, which can create release tags. App-opened PRs also trigger CI.

Merge after: coder/github-org-terraform#202 (the release-pr env and the App's pull_requests: write) and coder/gcp#471 (the key trusts this workflow in release-pr) are applied, the App's new permission is accepted, and release-pr has the three App secrets.

actionlint is clean, and zizmor shows no new findings.

🤖 Generated with Claude Code

GITHUB_TOKEN can't open pull requests in the coder org, so the release's
changelog pull request failed. The build job now uploads the changed files,
and a new last job (changelog) in the main-only release-pr environment opens
the PR as coder-jetbrains-coder-release (Cloud KMS). Only that job gets
id-token, so the Gradle build can't sign as the App.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kylecarbs
kylecarbs merged commit 8b11ac2 into main Nov 20, 2026
6 checks passed
@kylecarbs
kylecarbs deleted the ci/release-pr-app-token branch November 20, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants